RemoteActionCompat

Represents a remote action that can be called from another process. The action can have an associated visualization including metadata like an icon or title.

This is a backward-compatible version of RemoteAction.

Constructors

Link copied to clipboard
constructor(@NonNull icon: @NonNull IconCompat, @NonNull title: @NonNull CharSequence, @NonNull contentDescription: @NonNull CharSequence, @NonNull intent: @NonNull PendingIntent)
constructor()
Used for VersionedParcelable.
constructor(@NonNull other: @NonNull RemoteActionCompat)
Constructs a RemoteActionCompat using data from other.

Properties

Link copied to clipboard
@NonNull
open var mActionIntent: @NonNull PendingIntent
Link copied to clipboard
@NonNull
open var mContentDescription: @NonNull CharSequence
Link copied to clipboard
Link copied to clipboard
@NonNull
open var mIcon: @NonNull IconCompat
Link copied to clipboard
Link copied to clipboard
@NonNull
open var mTitle: @NonNull CharSequence

Functions

Link copied to clipboard
@RequiresApi(value = 26)
@NonNull
open fun createFromRemoteAction(@NonNull remoteAction: @NonNull RemoteAction): @NonNull RemoteActionCompat
Creates an RemoteActionCompat from a RemoteAction.
Link copied to clipboard
@NonNull
open fun getActionIntent(): @NonNull PendingIntent
Return the action intent.
Link copied to clipboard
@NonNull
open fun getContentDescription(): @NonNull CharSequence
Return a content description representing the action.
Link copied to clipboard
@NonNull
open fun getIcon(): @NonNull IconCompat
Return an icon representing the action.
Link copied to clipboard
@NonNull
open fun getTitle(): @NonNull CharSequence
Return an title representing the action.
Link copied to clipboard
open fun isEnabled(): Boolean
Return whether this action is enabled.
Link copied to clipboard
open fun setEnabled(enabled: Boolean)
Sets whether this action is enabled.
Link copied to clipboard
open fun setShouldShowIcon(shouldShowIcon: Boolean)
Sets whether the icon should be shown.
Link copied to clipboard
Return whether the icon should be shown.
Link copied to clipboard
@RequiresApi(value = 26)
@NonNull
open fun toRemoteAction(): @NonNull RemoteAction
Convert this compat object to RemoteAction object.